package com.ysd.impl;

import java.util.List;
import java.util.Optional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ysd.dao.userDao;
import com.ysd.entity.User;
import com.ysd.service.userService;
/**
 * 用户实现
 * @author CJP
 *
 */
@Service
public class userSerImpl implements userService {

	@Autowired
	userDao ud;
	

	@Override
	public Integer addUser(User s) {
		ud.save(s);
		return 1;
	}


	@Override
	public Integer delUser(Integer uid) {
		ud.delete(uid);
		return 1;
	}


	@Override
	public User findByadmin(String uloginname, String upassword) {
		// TODO Auto-generated method stub
		return ud.findByadmin(uloginname, upassword);
	}


	@Override
	public Integer ResetPwdById(Integer id) {
		// TODO Auto-generated method stub
		return ud.ResetPwdById(123456, id);
	}


	@Override
	public Integer updateLockById(String string, Integer id) {
		// TODO Auto-generated method stub
		return ud.updateLockById(string, id);
	}

}
